#ifndef __DECORATE_H__
#define __DECORATE_H__
#include <iostream>
#include <string>

class Person
{
private:
    std::string m_name;
public:
    Person()=default;
    Person(const std::string& name):m_name(name){};
    virtual ~Person(){
        std::cout << "destruct Person" << std::endl;
    };
    virtual void show() = 0;
};

class Student :public Person
{
public:
    Student(const std::string& name):Person(name){}
    ~Student(){
         std::cout << "destruct Student" << std::endl;
    };
    virtual void show() override;
};

class Lawyer :public Person
{
public:
    Lawyer(const std::string& name):Person(name){}
    ~Lawyer(){
        std::cout << "destruct Lawyer" << std::endl;
    }
    virtual void show() override;
};

class Decorator : public Person{
protected:
    Person* m_person;
public:
    Decorator()=default;
    void decorate(Person* person){
        m_person = person;
    }
    virtual ~Decorator(){
        std::cout << "destruct Decorator" << std::endl;
    }

    virtual void show();
};

class TShit : public Decorator{
public:
    ~TShit(){
        std::cout << "destruct TShit" << std::endl;
    }
    virtual void show();
};

class BigTrouser : public Decorator{
public:
    ~BigTrouser(){
        std::cout << "destruct BigTrouser" << std::endl;
    }
    virtual void show();
};

class Ballshoes : public Decorator{
public:
    ~Ballshoes(){
        std::cout << "destruct Ballshoes" << std::endl;
    }
    virtual void show();
};

class Suit : public Decorator{
public:
     ~Suit(){
        std::cout << "destruct Suit" << std::endl;
    }
    virtual void show();
};

class Tie : public Decorator{
public:
    ~Tie(){
        std::cout << "destruct Tie" << std::endl;
    }
    virtual void show();
};

class LeatherShoes : public Decorator{
public:
    ~LeatherShoes(){
        std::cout << "destruct LeatherShoes" << std::endl;
    }
    virtual void show();
};
 


#endif